﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="../Public/js/html5.js"></script>
<script type="text/javascript" src="../Public/js/respond.min.js"></script>
<script type="text/javascript" src="../Public/js/PIE_IE678.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="../Public/css/H-ui.css"/>
<link type="text/css" rel="stylesheet" href="../Public/css/H-ui.admin.css"/>
<link type="text/css" rel="stylesheet" href="../Public/font/font-awesome.min.css"/>
<!--[if IE 7]>
<link href="../Public/font/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->

<title>店铺展示</title>
</head>
<style>
.current{padding: 4px 11px;background:#18BC9C ;color: #fff; border: 1px solid #e5e5e5; font-size: 15px }
.num{ background: ; color: #009f8f;padding: 4px 11px;border: 1px solid #e5e5e5; font-size: 15px   }
.prev{border: 1px solid #e5e5e5; background: ;  color: #009f8f; font-size: 15px;padding: 4px 11px;}
.next{ border: 1px solid #e5e5e5; background: ; color: #009f8f; font-size: 15px;padding: 4px 11px; }

.ddd{border: 1px solid #e5e5e5; color:#009f8f;padding: 4px 11px;font-size: 15px}
.table a:hover{ text-decoration:none; }

</style>
<body>
<nav class="Hui-breadcrumb"><i class="icon-home"></i> 首页 <span class="c-gray en">&gt;</span> 订单管理 <span class="c-gray en">&gt;</span> 订单列表 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>
 <form action="" method="POST" class="form-search" >
<div class="pd-20">

  <div class="text-c">
  订单编号: <input type="text" class="input-text radius" style="min-width:150px" placeholder="订单编号" id="title" name="code" value="{$Think.post.code}">

  日期范围：
    <input type="text" name="stime" onfocus="WdatePicker()" id="logmin" placeholder="起始时间"  class="input-text Wdate" style="width:120px;" value="{$Think.post.stime}">
    -
    <input type="text" name="etime" onfocus="WdatePicker()" id="logmax" placeholder="结束时间"  class="input-text Wdate" style="width:120px;" value="{$Think.post.etime}">


  <button type="submit" class="btn btn-success radius" id="searchFormBtn" data-action="{:U('Dingdan/index')}"  onclick="formsubmit(this)" ><i class="icon-search"></i> 搜索</button>
    <button type="submit" class="btn btn-success radius" id="searchFormBtn" data-action="{:U('Dingdan/expExcel')}"  onclick="formsubmit(this)"><i class="icon-download"></i> 导出数据</button>
  </div>

  </div>
  </form>
<div class="pd-20">

 <form action="{:U('Dingdan/del')}" method="POST" id="delsh">

   <div class="panel panel-primary radius">
         <div class="panel-header">
    &nbsp;&nbsp;   <span class="l"> <a href="#" class="btn btn-danger radius"><i class="icon-trash"></i> 批量删除</a></span>
   &nbsp;&nbsp;    <!-- <a href="{:U('Admin/User/addUser')}"  class="btn btn-primary radius"><i class="icon-plus"></i>  添加资讯信息</a> -->
<span class="r c-black">共有数据：<strong>{:$pageCount}</strong> 条</span>
 </div>
  </div>
	<div class="panel-body">
  <table  class="table table-border table-bordered  radius table-striped table-hover"  width="100%" height="20px">
    <thead>
    
      <tr class="text-c">
           <th width="31" align="center"><input type="checkbox" name="" value=""></th>  
        <th width="30" align="center">ID</th>
      <!--   <th width="150" align="center">展示分类</th> -->
        <th width="80" align="center">订单编号</th>
        <th  width="140" align="center">收货地址</th>
        <th width="80" align="center">下单日期</th>
<!--           <th width="80" align="center">设计师</th> -->
        <th width="80" align="center">交易状态</th>
    
<!--        <th width="80" align="center">所在城市</th> -->
      <th width="50" align="center">操作</th>
        <th width="67" align="center">详情信息</th>
      </tr>
    </thead>
    <tbody>
	 <volist name="dingdan" id="vo" key="key">
      <tr class="text-c">
          <td align="center"><input type="checkbox" value="{$vo.id}" id="id" name="id[]"></td>
     <!--    <td align="center">{:(I('get.p'))?((I('get.p')-1)*20+$key):($key)}</td> -->
   <td align="center">{$vo.id}</td>
        <td align="center">{$vo.code}</td>
         <td align="center" style="text-align: center;">{$vo.address}</td>
   <td align="center">  {$vo.time|date="Y-m-d H:i:s",###}</td>
 <!--   <td align="center"><if condition="$vo.shejishi neq admin">{$vo.shejishi}<else/>后台admin</if></td> -->
     <td align="center"> <if condition='$vo.htid eq 0'>已下单</if><if condition='$vo.htid eq 1'>已发货</if></td>
         
<!--      <td align="center">{$vo['dingdan']['chengshi']}</td> -->
     <td align="center">   
                    <if condition="$vo.htid eq 0 ">
                    <div class="table" style="font-size: 11px;color: #7bc2f1;width: 50px; margin: 0 auto;background-color: #18BC9C; " >
                        <span><a style="color:#fbf2f2;" href="javascript:;"  onClick="jd(this,{$vo.id},{$vo.code})">发货</a></span>
                        
                    </div>
                    </if>

                     <if condition="$vo.htid eq 1 ">
                    <div class="table" style="font-size: 11px;color: #7bc2f1;" >
                   
                    </div>
                    </if>

                   
                    </td>
        <td align="center" class="f-14 admin-manage"><a title="详细" href="{:U('Admin/Dingdan/update',array('id'=>$vo['id']))}"  class="ml-5" style="text-decoration:none"><i class="icon-edit"></i></a> </td>
      </tr>
    </volist>
    </tbody>
  </table>
 <div id="pageNav" class="pageNav"> {$page}</div>
</div>

</form>
<script type="text/javascript" src="../Public/js/jquery.min.js"></script>
 <script type="text/javascript" src="../Public/My97DatePicker/WdatePicker.js"></script>
<!-- <script type="text/javascript" src="../Public/layer/layer.min.js"></script> -->
<script type="text/javascript" src="../Public/js/jquery.form.js"></script>
<script type="text/javascript" src="../Public/js/H-ui.admin.js"></script>  
    <script type="text/javascript" src="App/Home/View/Public/script/jquery.js"></script>
<script type="text/javascript" src="App/Home/View/Public/layer/layer.js"></script>

<script type="text/javascript">


$(function(){

  $(".l").click(function(){
     layer.confirm('确认要删除吗？',{skin:'layui-layer-molv',title:'订单信息'},function(index){
     $("#delsh").submit();
    
    });

  });
});

  function formsubmit(obj){
        var url = $(obj).attr("data-action");
        $(".form-search").attr("action",url);
    }

</script>
<script>
function jd(obj,id,code){
 layer.confirm(code+'确认要发货吗？',{skin:'layui-layer-molv',title:'订单信息'},function(index){
     $.ajax({
        url:'{:U("Dingdan/daijiedan")}',
        type:'post',
        data:{
         id:id
        },
        success:function(data){
          if (data==1) {
            layer.msg('发货成功',{time:1000},function(){

     location.reload();
})
          }


        }

 })
    
    });


}






</script>
</body>
</html>